/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package FourShTests;

import Rout.*;
//import com.sun.javafx.scene.layout.region.RepeatStruct;
import org.jboss.netty.channel.ChannelHandler;
import org.testng.annotations.*;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;

/**
 *
 * @author user
 */
public class Shared4XRX {

    private GoBefore browser = new GoBefore();

    @BeforeMethod
    public void setUp() throws Exception {

        System.out.println("\n Run test: " + getClass().getSimpleName());
//        browser = new GoBefore();
        browser.xpFilename = "/html/body/div[7]/div/div/div[2]/h1";
        browser.curURL = "http://www.4shared.com/photo/jIP-_j8sce/Test_file.html";
        browser.repDir = getClass().getSimpleName();

    }

    @Test //XRX
    public void XRX() throws Exception {

                      
        browser.cssButton = "#downloadHelperLink > div";
        browser.clButton = "helperButtonGradient";
        browser.xpButton = "//*[@id=\"downloadHelperLink\"]/div";       
      

        browser.setUp();      
        browser.driver.get(browser.curURL);       
        //scroll
        browser.clicker.sendKeys(Keys.PAGE_DOWN).perform();
        browser.testRun();
        //sleep
        Thread.sleep(2000);
        
        browser.lpDetect();
        browser.verFilePresent();
        browser.verFilename();        

    }

    @AfterMethod
    public void Down() throws Exception {
        browser.driver.quit();

    }

}
